home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
TEMP
/
GNU
/
flex
/
Deficienci
< prev
next >
Wrap
Text File
|
1995-06-28
|
2KB
|
60 lines
Deficiencies
Previous: <Files=>Files> * Next: <See also=>Seealso> * Up: <Top=>!Root>
#Wrap on
{fH3}Deficiencies \/ Bugs{f}
Some trailing context patterns cannot be properly matched
and generate warning messages ("dangerous trailing
context"). These are patterns where the ending of the first
part of the rule matches the beginning of the second part,
such as "zx\*\/xy\*", where the 'x\*' matches the 'x' at the
beginning of the trailing context. (Note that the POSIX
draft states that the text matched by such patterns is
undefined.)
For some trailing context rules, parts which are actually
fixed-length are not recognized as such, leading to the
abovementioned performance loss. In particular, parts
using '|' or \{n\} (such as "foo\{3\}") are always considered
variable-length.
Combining trailing context with the special '|' action can
result in {fEmphasis}fixed{f} trailing context being turned into the
more expensive {fStrong}variable{f} trailing context. For example, in
the following:
#Wrap off
#fCode
%%
abc |
xyz\/def
#f
#Wrap on
Use of {fEmphasis}unput(){f} invalidates yytext and yyleng, unless the
{fEmphasis}%array{f} directive or the {fEmphasis}-l{f} option has been used.
Pattern-matching of NUL's is substantially slower than
matching other characters.
Dynamic resizing of the input buffer is slow, as it
entails rescanning all the text matched so far by the
current (generally huge) token.
Due to both buffering of input and read-ahead, you cannot
intermix calls to <stdio.h> routines, such as, for
example, {fEmphasis}getchar(){f}, with {fCode}flex{f} rules and expect it to work.
Call {fEmphasis}input(){f} instead.
The total table entries listed by the {fEmphasis}-v{f} flag excludes the
number of table entries needed to determine what rule has
been matched. The number of entries is equal to the
number of DFA states if the scanner does not use {fCode}REJECT{f}, and
somewhat greater than the number of states if it does.
{fCode}REJECT{f} cannot be used with the {fEmphasis}-f{f} or {fEmphasis}-F{f} options.
The {fCode}flex{f} internal algorithms need documentation.